import Vue from 'vue'
import vant from 'vant'
import 'vant/lib/index.css';
import App from './App.vue'
import router from './router'
import moment from 'moment';
import { serverUrl } from "./utils/tools"
import "./assets/main.scss"
Vue.use(vant);
Vue.config.productionTip = false

Vue.filter("dalImg",(url)=>{
  if(url) {
    if (url.startsWith("http")){
      return url;
    }
    return serverUrl + url;
  }
  return require("./assets/images/1.jpg")
})
 Vue.filter("formatDate",(date) => moment(date).format("YYYY-MM-DD HH:mm:ss"))

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
